﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Epona.Domain.Query
{
    public class PositionalParameters:IQueryParameters
    {
        public object[] Param { private set; get; }

        public static PositionalParameters Create()
        {
            return new PositionalParameters(new object[]{});
        }

        public static PositionalParameters Create(params object[]param)
        {
            return new PositionalParameters(param);
        }

        public static PositionalParameters Create(IList<object>param)
        {
            return new PositionalParameters(param.ToArray());
        }

        private PositionalParameters(object[]param)
        {
            if(param==null)
            {
                this.Param = new object[] { };
            }
            else
            {
                this.Param = param;
            }
        }
    }
}
